<?php
require_once "sites/default/default.settings.php";
//var_export(MODULE_PATH);
//$handles = opendir(MODULE_PATH);
//var_dump(readdir($handles));
//$path    = 'modules';
//$files = scandir($path);
//var_dump($files);

//$urlRoutes = array(
//    '/^\/$/' => 'Home',
//    '/^\/about\/$/' => 'About',
//    '/^\/blog\/[\d]+\/[\w-\d]*\/$/' => 'Article',
//    '/^\/khoinghiep\/[a-zA-Z]*\/$/' => 'Category',
//    '/^\/login\/$/' => 'Authentication',
//    '/^\/logout\/$/' => 'Authentication'
//);
// 
//$host = explode("/", $_SERVER["SCRIPT_NAME"]);
//$host_l = strlen($host[1]);
//$m = substr($_SERVER['REQUEST_URI'], $host_l + 2);
//$x = explode("/", $m);
//var_dump($x);die;

//
//if(substr($_SERVER['REQUEST_URI'], -1) != '/') {                
//    header('Location: ' . $_SERVER['REQUEST_URI'] . '/');
//}
//
//foreach($urlRoutes as $expression => $controllerName) {
//    var_dump(preg_match($expression, $_SERVER['REQUEST_URI']));
////    if(preg_match($expression, $_SERVER['REQUEST_URI'])) {
////        $controller = $controllerName;
////    }
//}
Router::post();
require_once APP_MODULE_PATH . "home/index" .EXT;
?>